#define _CRT_SECURE_NO_WARNINGS
#include <cstring>
#include<iostream>
using namespace std;
class Person
{
	char name[10];
	char sex;
	int age;
public:
	Person(const char* Name, int Age,char Sex)
	{
		strcpy(name, Name);
		sex = Sex;
		age = Age;

	}
	char* getname()
	{
		return name;
	}
	char getsex()
	{
		return sex;
	}
	int getage()
	{
		return age;
	}
};
class Teacher :public Person
{
	char dept[30];
	int salary;
public:
	Teacher(const char* Name, int Age, char Sex, const char* Dept, int Salary)
		:Person(Name, Age,Sex)
	{
		strcpy(dept, Dept);
		salary = Salary;
	}
	char* getdept()
	{
		return dept;
	}
	int getsalary()
	{
		return salary;
	}
	char* Getname()
	{
		return getname();
	}
	char Getsex()
	{
		return getsex();
	}
	int Getage()
	{
		return getage();
	}
};
class Student :public Person
{
	char _class[5];
	char ID[10];
public:
	Student(const char* Class, const char* Id)
		:Person("***",'m',0)
	{
		strcpy(_class, Class);
		strcpy(ID, Id);
	}
	char* getclass()
	{
		return _class;
	}
	char* getid()
	{
		return ID;
	}
};
class Graduate :public Student, public Teacher
{
public:
	Graduate(const char* Name, int Age, char Sex, const char* Dept, int Salary, const char* Id, const char* Class)
		:Teacher(Name,Age, Sex, Dept, Salary), Student(Class, Id)
	{
		;
	}
	void showMe()
	{
		cout << "class: " << getclass() << endl;
		cout << "id: " << getid() << endl;
		cout << "name: " << Getname() << endl;
		cout << "sex: " <<  Getsex() << endl;
		cout << "age: " << Getage() << endl;
		cout << "dept: " << getdept() << endl;
		cout << "salary: " << getsalary();
	}
};
int main() {

	Graduate stu1("Lisi", 22, 'm', "College of Informatics", 2000, "2015013", "S101");

	stu1.showMe();

	return 0;

}